#ifndef CINGREDIENT_H
#define CINGREDIENT_H

#include <QObject>
#include "cobject.h"
namespace cooking {

class CIngredient : public CObject
{
    Q_OBJECT
    Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
    Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
    Q_PROPERTY(int categoryId READ categoryId WRITE setCategoryId NOTIFY categoryIdChanged)
    Q_PROPERTY(QString picture READ picture WRITE setPicture NOTIFY pictureChanged)
    Q_PROPERTY(int unitTypeId READ unitTypeId WRITE setUnitTypeId NOTIFY unitTypeIdChanged)
public:
    explicit CIngredient(QObject *parent = 0);

    QString name();
    void setName(QString name);

    QString description();
    void setDescription(QString description);

    int categoryId();
    void setCategoryId(int categoryId);

    QString picture();
    void setPicture(QString picture);

    int unitTypeId();
    void setUnitTypeId(int unitTypeId);

signals:
    void nameChanged();
    void descriptionChanged();
    void categoryIdChanged();
    void pictureChanged();
    void unitTypeIdChanged();

public slots:

private:
    QString m_name;
    QString m_description;
    int m_category_id;
    QString m_picture;
    int m_unit_type_id;
};
} // namespace cooking
#endif // CINGREDIENT_H
